import {defineStore} from 'pinia'
import { ref } from 'vue'
// 规范是 use开头的小驼峰写法命名
export const useChannelStore = defineStore('channel',() => {
  // 频道id数据
  const channelId = ref(0)

  // 修改channelId的方法
  const changeChannelId = (id: number) => {
    channelId.value = id
  }
  return {
    channelId,
    changeChannelId
  }
})